home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
prform17.zip
/
PRFORM.DOC
< prev
next >
Wrap
Text File
|
1988-06-16
|
17KB
|
397 lines
PRFORM(1) USER COMMANDS PRFORM(1)
NAME
PRFORM - A PRintout FORMatter in C
SYNOPSIS
PRFORM is invoked by a command line of the following form:
prform [[-option -option ...] file1 file2 ...] ...
- or -
prform [-option -option ...]
where the options preceeding each group of files specify the
format of the output for that group of files. In the first
form, PRFORM acts on the specified files; in the second
form, PRFORM acts on standard input.
Options are:
-a as-is output (expand tabs and page breaks only)
-e# end printing after the #th page
-E no ending line number in page count
-hfMprt sets the page heading
f places the file name into the page heading
M places the header message (defined by -M)
into the page heading
p places the page number into the page heading
r places the rest of the heading on the right side
t places the date and time into the page heading
no option after h sets no page heading
(default option sequence is frp)
-hefMprt sets the page heading for even pages
(default option sequence is )
-hofMprt sets the page heading for odd pages
(default option sequence is )
-H prints this help message on stderr and exits
-l# is the length of a line (def 80)
-m# is the length of the left margin (def 5)
-M<text> sets the header message to <text>
-n causes each line to be numbered (-M set to 8)
-o<name> redirects the output listing to the indicated file
-p# is the number of lines/page (def 62)
-s# start printing at the #th page (def 1)
(note: also does -S#, setting first page number)
-S# sets the number of the first printed page
-t# is the number of columns per tab stop (def 8)
-T truncate lines which are too long
DESCRIPTION
PRFORM generates a formatted listing of one or more text
files. The listing can include features such as headers at
Sun Release 3.2 Last change: 16 June 1988 1
PRFORM(1) USER COMMANDS PRFORM(1)
the top of each page, numbers in front of each line, wra-
paround if lines exceed the width of a page, page breaks
after an indicated number of lines, etc. The listing can
start on a specified page if desired. PRFORM sends its out-
put to either standard output (default) or a text file.
PRFORM functions as either a conventional program, process-
ing files specified on its command line, or as a filter,
obtaining its input from standard input. If no files are
specified on the command line (only zero or more options),
then PRFORM inputs from standard input.
Most of the options to PRFORM are self-explanatory. Each
group of options encountered in the command line causes a
reset to the default options and then a setting of the indi-
cated options, so previous options selections are overrid-
den; example:
prform -a -m5 file1 -m0 file2
\____/ \_/
Group 1 Group 2
file1 is printed as-is with a 5-char margin
file2 is printed with all defaults and no margin
_A_s-_I_s _O_u_t_p_u_t
The -a option causes the file to be output as-is. All
option are set by this command to the following values:
Lines are not truncated.
No heading is output (default heading, even-page head-
ing, and odd-page heading are cleared).
Line length is set to the maximum allowed for the pro-
gram (400 characters).
Left margin is set to zero.
Line numbering is turned off.
Number of lines per page is set to zero (no paging).
Starting page is set to 1.
Tab stops are set to every 8.
Sun Release 3.2 Last change: 16 June 1988 2
PRFORM(1) USER COMMANDS PRFORM(1)
The -a option can be followed by other options, such as -m#,
to set a bare output with the exception of some minimum pro-
cessing (such as a left margin).
_L_i_n_e _W_r_a_p_a_r_o_u_n_d _a_n_d _T_r_u_n_c_a_t_i_o_n
If the length of a line exceeds the number of characters
specified by the -l (ell) option or its default value, that
line will either wrap around to the next line of the prin-
tout or be truncated. If the -T option is specified, the
line will be truncated; if not, the line will wrap around,
and the continuation line is prefixed by two greater than
signs (>>) on the far left.
-_l_7_0 sets the line length to 70 characters total (includ-
ing the left margin).
-_l_7_0 -_m_1_0 sets the line length to 70 characters and the
left margin to 10. There is a maximum of 60 characters
in each output line.
-_T -_l_5_0 sets the line length to 50 characters and enables
truncation of any characters beyond column 50 in the
generated listing.
_P_a_g_e _R_a_n_g_e_s _a_n_d _P_a_g_e _N_u_m_b_e_r_i_n_g
The -s# and -e# commands set the starting and ending page
boundaries. If the -s# command is not given, the output
starts at the first page. If the -e# command is not given,
the output ends at the last page. The arguments to these
commands are absolute page numbers, indicating the nth phy-
sical page in the listing. This is as opposed to the -S#
command.
The -S# command sets the number of the first page to be
printed. If the -S# command is not given, this number is
the same as the absolute number of the first printed page
(same as the number given in the -s# command). The number
given by the -S# command is the number that appears in the
page heading for the first page printed, and each page
printed after that is incremented from this starting number.
The -E command causes the page numbers printed in the head-
ing to omit the " of n" part of the output (eg, without -E
the heading contains "Page 1 of 5", but with -E the heading
contains "Page 1").
Sun Release 3.2 Last change: 16 June 1988 3
PRFORM(1) USER COMMANDS PRFORM(1)
-_s_5 -_e_7 causes the 5th through the 7th pages to b